package com.bbw.act1.v3;

import com.bbw.act1.v3.fly.FlyWithWings;

/**
 * @Author cpw
 * @Date 2023/6/26 15:30
 */
public class DuckTest {
    public static void main(String[] args) {
        Duck duck = new RubberDuck();
        duck.performFly();
        duck.performQuack();
        // 设置能飞
        duck.setFlyable(new FlyWithWings());
        duck.performFly();
    }
}
